#pragma once

#include "IXEnumConfigNode.h"
#include "XBaseObjImpl.h"


class CXEnumConfigNodeImpl : public CXBaseObjImpl<IXEnumConfigNode>
{
    typedef CXBaseObjImpl<IXEnumConfigNode> superclass;
    BEGIN_DEF_SKIN_CLASS(CXEnumConfigNodeImpl, superclass, gs_strGuidXSkin)
        IMP_BASIC_INTF(IXEnumConfigNode, 0)
        IMP_BASIC_INTF(IXEnum, eIntf_NoCreate)
    END_DEF_SKIN_CLASS();

public:
    CXEnumConfigNodeImpl();
    virtual ~CXEnumConfigNodeImpl();

public:
    // IXEnum
    virtual HRESULT STDMETHODCALLTYPE   Reset();

    // IXEnumConfigNode
    virtual HRESULT STDMETHODCALLTYPE   put_FirstElement(IN XHANDLE xElment, IN LPCTSTR szNodeName);
    virtual HRESULT STDMETHODCALLTYPE   Next(IXConfigNode** pData);

protected:
    std::string     m_strNodeName;
    TiXmlElement*   m_pFirstNode;
    TiXmlElement*   m_pCurrentNode;
};


